package com.cqw.commontest.designmode.abstractfactory;

/**
 * @Author: caoqingwen
 * @CreateTime: 2021-09-24 14:08
 * @Description:
 */
public class Main {

    public static void main(String[] args) {
//        Car car = new Car();
//        car.go();
//
//        AK47 ak47 = new AK47();
//        ak47.shoot();
//
//        Bread bread = new Bread();
//        bread.printName();

        AbstractFactory modernFactory = new ModernFactory();

        Food food = modernFactory.createFood();
        food.printName();
        Vehicle vehicle = modernFactory.createVehicle();
        vehicle.go();
        Weapon weapon = modernFactory.createWeapon();
        weapon.shoot();


    }


}
